Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Reinclude --loader temporarily, moving new work to Phase3 #47

Merged
merged 3 commits into from
Mar 6, 2019

Conversation

guybedford
Copy link
Contributor

Previously, --loader was reverted to begin work on a new loader API. This work has progressed really well but it is clear at this point that it will need to be released as part of Phase 3.

Instead of shipping with no loaders at all, bringing back the old API while being explicit that it is being redesigned and will be replaced ensures that we can still allow userland experimentation. For example, it would then be possible to implement our final default loader API as a --loader of Node.js 12.0.0.

I've upgraded the loader implementation to follow the naming conventions of our current implementation ("commonjs", "module" as the type strings).

Copy link
Contributor

@MylesBorins MylesBorins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I'd like to see an explicit warning about this implementation being replaced.

Assuming the tests all pass this implementation drops in almost unchanged, and as such I think it is reasonable to leave the implementation in for now with the intent to replace it later in phase 3.

lib/internal/process/esm_loader.js Show resolved Hide resolved
@MylesBorins
Copy link
Contributor

MylesBorins commented Mar 4, 2019

@GeoffreyBooth
Copy link
Member

This seems fine to me, do you mind please explaining any caveats that users should be aware of if they try to use this implementation? Like what would you say in the docs to any users considering using this?

@MylesBorins
Copy link
Contributor

We should also docs deprecate the prior loader

@guybedford
Copy link
Contributor Author

@MylesBorins MylesBorins changed the base branch from modules-lkgr to master March 5, 2019 20:08
@MylesBorins MylesBorins changed the base branch from master to modules-lkgr March 5, 2019 20:08
@MylesBorins MylesBorins added the enhancement New feature or request label Mar 6, 2019
@MylesBorins
Copy link
Contributor

MylesBorins commented Mar 6, 2019

Rebased against LKGR and pushed a fixup for the broken tests

CI: https://ci.nodejs.org/job/node-test-pull-request/21245/

edit: Tests are good!

@MylesBorins MylesBorins merged commit 6c793ca into nodejs:modules-lkgr Mar 6, 2019
@MylesBorins
Copy link
Contributor

48 hours, landing

nodejs-ci pushed a commit that referenced this pull request Aug 21, 2019
BUGFIXES

* [`27cccfbda`](npm/cli@27cccfb)
  [#223](npm/cli#223) vulns → vulnerabilities in
  npm audit output ([@sapegin](https://github.com/sapegin))
* [`d5e865eb7`](npm/cli@d5e865e)
  [#222](npm/cli#222)
  [#226](npm/cli#226) install, doctor: don't crash
  if registry unset ([@dmitrydvorkin](https://github.com/dmitrydvorkin),
  [@isaacs](https://github.com/isaacs))
* [`5b3890226`](npm/cli@5b38902)
  [#227](npm/cli#227)
  [npm.community#9167](https://npm.community/t/npm-err-cb-never-called-permission-denied/9167/5)
  Handle unhandledRejections, tell user what to do when encountering an
  `EACCES` error in the cache.  ([@isaacs](https://github.com/isaacs))

DEPENDENCIES

* [`77516df6e`](npm/cli@77516df)
  `licensee@7.0.3` ([@isaacs](https://github.com/isaacs))
* [`ceb993590`](npm/cli@ceb9935)
  `query-string@6.8.2` ([@isaacs](https://github.com/isaacs))
* [`4050b9189`](npm/cli@4050b91)
  `hosted-git-info@2.8.2`
    * [#46](npm/hosted-git-info#46)
      [#43](npm/hosted-git-info#43)
      [#47](npm/hosted-git-info#47)
      [#44](npm/hosted-git-info#44) Add support for
      GitLab subgroups ([@mterrel](https://github.com/mterrel),
      [@isaacs](https://github.com/isaacs),
      [@ybiquitous](https://github.com/ybiquitous))
    * [`3b1d629`](npm/hosted-git-info@3b1d629)
      [#48](npm/hosted-git-info#48) fix http
      protocol using sshurl by default
      ([@fengmk2](https://github.com/fengmk2))
    * [`5d4a8d7`](npm/hosted-git-info@5d4a8d7)
      ignore noCommittish on tarball url generation
      ([@isaacs](https://github.com/isaacs))
    * [`1692435`](npm/hosted-git-info@1692435)
      use gist tarball url that works for anonymous gists
      ([@isaacs](https://github.com/isaacs))
    * [`d5cf830`](npm/hosted-git-info@d5cf830)
      Do not allow invalid gist urls ([@isaacs](https://github.com/isaacs))
    * [`e518222`](npm/hosted-git-info@e518222)
      Use LRU cache to prevent unbounded memory consumption
      ([@iarna](https://github.com/iarna))

PR-URL: nodejs/node#29023
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants